<?php
class Aes {
    const AESKEY = "Tv1gyI4vUeWK0Bib";
    const AESIV = "2516325478965124";

    /**
     * 构造方法
     */
    public function __construct(){}

    // 加密
    public static function aesEn($decodeData){
        return  @openssl_encrypt($decodeData, "AES-128-CBC",self::AESKEY, PKCS7_DETACHED , self::AESIV);
    }

    //解密
    public static function aesDe($encodeData){
        return @openssl_decrypt($encodeData,  "AES-128-CBC", self::AESKEY, PKCS7_DETACHED, self::AESIV);
    }
}